Learning Objectives

After completing this lesson, you’ll be able to:

In this lesson, you will:

Learning Objectives

After completing this lesson, you’ll be able to:

In this lesson, you will:

Resources

If you're taking a live Safe Software-hosted training course or using an on-demand lab for this course, we've already imported the content for this lesson into your FME Flow.
If you're completing this lesson with your own FME Flow, you must import the starting project with the content into your FME Flow.
See FME Flow Authoring: Instructions to Import the Starting Project for directions to import the project to your own FME Flow. 

Output Attributes

Each FME Flow Automations trigger and action has two output ports: success and failure. When FME Flow sends messages through these ports to downstream actions, it includes key-value pairs that extract information from the JSON message. Each trigger and action type has pre-defined Event Attributes and Custom Attributes that the automation author may create. You may reference these Output Attributes in downstream actions within the automation. 

For example, you may reference the file.path attribute from the Resource or Network Directory trigger in a source file parameter in a downstream Run a Workspace action. 

Note

For more information on Output Attributes and Automation Parameters, please review the Respond to Real-time Events course. 

FME Flow Automations Writer

While Output Attributes allow you to pass some basic information about each trigger or action downstream, the Run a Workspace action only sends job success or failure information. The Run a Workspace Event Attributes do not include any information about the data the workspace processes. Custom Attributes also don't contain options to link to that information. However, the FME Flow Automations writer helps overcome this problem and extracts information from within a workspace into an Automation. 

Like any other writer, you add the FME Flow Automations writer to your workspace. 

   

When you add the workspace to a Run a Workspace action in an Automation, an additional output port is created for the automation writer. 

FME Flow outputs a JSON object from the automations writer port for each feature that routes to the writer within the workspace. FME Flow creates one output port for each FME Flow Automations feature type in the workspace.

Each feature contains values for the attributes added to the action's Output Attributes. 

To use these attribute values in the automation, you link to the automation writer attributes in downstream actions. By doing so, you can control the flow of your automation based on the data you process in your workspaces.

The automations writer offers flexibility in which information you pass from a workspace into the automation. You can create as many output ports as required to allow advanced filtering or pass multiple messages to numerous downstream actions. 

For example, the WorkOrders port in this workspace outputs features for work orders in school zones that have not yet been processed. If twenty features are passed through the port, the Contact School workspace will run twenty times to process each work order. 

In this example, the workspace processes work orders and filters them by type. For each run of the workspace action, multiple features may be sent through each port, which will likely run different downstream workspaces based on their type. 

Note

To learn more about the FME Flow Automations writer, check out this tutorial on Routing Data Between Workspaces in Automations

Exercise

Jennifer previously created an Incoming Building Footprints automation that processes shapefiles of building footprint updates, writes the updates to a geodatabase, and sends an email with the workspace's translation status. She will build on that scenario and send an email summarizing the updates. To get the summary information about the updates from the workspace to the Email external action in her automation, Jennifer must use an FME Flow Automations writer.

In this exercise, you will: 

1) Open Starting Workspace

2) Create Summary Information

3) Add an Automations Writer

Next, FME will prompt you to configure the Feature Type.

4) Clean-up Attributes

5) Publish to FME Flow

Note

For more information on publishing workspaces to FME Flow and FME Flow's services, see the Deploy Workspaces on FME Flow course. 

6) Edit Automation

 

Note

If you still have your Incoming Building Footprints Automation from Respond to Real-time Events, you may continue editing it. Otherwise, you can import the Automations-Writer-Template Automation with the starting project.  

7) Add Run a Workspace Action

The Run a Workspace action updates and adds a port for the UpdatesSummary automations writer in the workspace. 

8) Add an Email External Action

You will configure the action to use a Gmail account for the SMTP credentials.

Note

This Gmail account password changes regularly. Please only use it for FME training purposes, or configure your SMTP account for the Email action. 

9) Save and Start Automation

10) Upload Shapefile to Trigger Automation

You've successfully completed Jennifer's automation to process shapefiles for building updates and update a database, using an FME Flow Automations writer to pass summary information about the number of updates from the workspace to send an email. 

 

Resources

If you're taking a live Safe Software-hosted training course or using an on-demand lab for this course, we've already imported the content for this lesson into your FME Flow.
If you're completing this lesson with your own FME Flow, you must import the starting project with the content into your FME Flow.
See FME Flow Authoring: Instructions to Import the Starting Project for directions to import the project to your own FME Flow. 

Output Attributes

Each FME Flow Automations trigger and action has two output ports: success and failure. When FME Flow sends messages through these ports to downstream actions, it includes key-value pairs that extract information from the JSON message. Each trigger and action type has pre-defined Event Attributes and Custom Attributes that the automation author may create. You may reference these Output Attributes in downstream actions within the automation. 

For example, you may reference the file.path attribute from the Resource or Network Directory trigger in a source file parameter in a downstream Run a Workspace action. 

Note

For more information on Output Attributes and Automation Parameters, please review the Respond to Real-time Events course. 

FME Flow Automations Writer

While Output Attributes allow you to pass some basic information about each trigger or action downstream, the Run a Workspace action only sends job success or failure information. The Run a Workspace Event Attributes do not include any information about the data the workspace processes. Custom Attributes also don't contain options to link to that information. However, the FME Flow Automations writer helps overcome this problem and extracts information from within a workspace into an Automation. 

Like any other writer, you add the FME Flow Automations writer to your workspace. 

   

When you add the workspace to a Run a Workspace action in an Automation, an additional output port is created for the automation writer. 

FME Flow outputs a JSON object from the automations writer port for each feature that routes to the writer within the workspace. FME Flow creates one output port for each FME Flow Automations feature type in the workspace.

Each feature contains values for the attributes added to the action's Output Attributes. 

To use these attribute values in the automation, you link to the automation writer attributes in downstream actions. By doing so, you can control the flow of your automation based on the data you process in your workspaces.

The automations writer offers flexibility in which information you pass from a workspace into the automation. You can create as many output ports as required to allow advanced filtering or pass multiple messages to numerous downstream actions. 

For example, the WorkOrders port in this workspace outputs features for work orders in school zones that have not yet been processed. If twenty features are passed through the port, the Contact School workspace will run twenty times to process each work order. 

In this example, the workspace processes work orders and filters them by type. For each run of the workspace action, multiple features may be sent through each port, which will likely run different downstream workspaces based on their type. 

Note

To learn more about the FME Flow Automations writer, check out this tutorial on Routing Data Between Workspaces in Automations

Exercise

Jennifer previously created an Incoming Building Footprints automation that processes shapefiles of building footprint updates, writes the updates to a geodatabase, and sends an email with the workspace's translation status. She will build on that scenario and send an email summarizing the updates. To get the summary information about the updates from the workspace to the Email external action in her automation, Jennifer must use an FME Flow Automations writer.

In this exercise, you will: 

1) Open Starting Workspace

2) Create Summary Information

3) Add an Automations Writer

Next, FME will prompt you to configure the Feature Type.

4) Clean-up Attributes

5) Publish to FME Flow

Note

For more information on publishing workspaces to FME Flow and FME Flow's services, see the Deploy Workspaces on FME Flow course. 

6) Edit Automation

 

Note

If you still have your Incoming Building Footprints Automation from Respond to Real-time Events, you may continue editing it. Otherwise, you can import the Automations-Writer-Template Automation with the starting project.  

7) Add Run a Workspace Action

The Run a Workspace action updates and adds a port for the UpdatesSummary automations writer in the workspace. 

8) Add an Email External Action

You will configure the action to use a Gmail account for the SMTP credentials.

Note

This Gmail account password changes regularly. Please only use it for FME training purposes, or configure your SMTP account for the Email action. 

9) Save and Start Automation

10) Upload Shapefile to Trigger Automation

You've successfully completed Jennifer's automation to process shapefiles for building updates and update a database, using an FME Flow Automations writer to pass summary information about the number of updates from the workspace to send an email.